package com.tuijian.vo;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *
 * @author 赵俊琦
 * {@code @date} 2023-06-08
 * @version 1.0
 * {@code @description} 商品数据类
 *
 */

@Data
@NoArgsConstructor
public class Product {
    /**
     * 排序
     */
    private int sort;
    /**
     * 用户id
     */
    private String userId;
    /**
     * 商品id
     */
    private String productId;
    /**
     * 商品名
     */
    private String productName;
    /**
     * 商品价格
     */
    private double productPrice;
    /**
     * 商品规格（经典款、新款等）
     */
    private String productSpecs;
    /**
     * 商品库存
     */
    private int productStock;
    /**
     * 商品得分
     */
    private double score;
    /**
     * 商品分类号（比如：“1-2-3”）
     */
    private String category;

    public Product(int sort, String userId, String productId, String productName, double productPrice, String productSpecs, int productStock, double score, String category) {
        this.sort = sort;
        this.userId = userId;
        this.productId = productId;
        this.productName = productName;
        this.productPrice = productPrice;
        this.productSpecs = productSpecs;
        this.productStock = productStock;
        this.score = score;
        this.category = category;
    }

    @Override
    public String toString() {
        return "Product{" +
                "sort=" + sort +
                ", userId='" + userId + '\'' +
                ", productId='" + productId + '\'' +
                ", productName='" + productName + '\'' +
                ", productPrice=" + productPrice +
                ", productSpecs='" + productSpecs + '\'' +
                ", productStock=" + productStock +
                ", score=" + score +
                ", category='" + category + '\'' +
                '}';
    }
}
